// component/details/ruleserve/ruleserve.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    goods_id: String,
    auction_price: Number,
    auction_range: Number,
    support: Number,
    auction_type: String
  },

  /**
   * 组件的初始数据
   */
  data: {
    mask_show: false
  },

  methods: {
    maskshow() {
      this.setData({
        mask_show: true
      })
      this.ruleData()
    },
    ruleData() {
      var _this = this
      console.log(this.data.goods_id)
      getApp().request({
        url: getApp().api.auction.rule,
        method: "GET",
        data: {
          auction_id: this.data.goods_id
        },
        success(res) {
          _this.setData({
            auction_price_rule: res.data.auction_price_rule,
            auction_range_rule: res.data.auction_range_rule,
            support_rule: res.data.support_rule,
            type_rule: res.data.type_rule
          })
          console.log(res)
        },
        fail(res) {
          console.log(res)
        }
      })
    },
    stopclick() {

    },
    maskhide() {
      this.setData({
        mask_show: false
      })
    }
  }
})